package com.ruoyi.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class TBasicRegion extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Integer id;

    /** name */
    @Excel(name = "name")
    @Size(min = 0, max = 250, message = "区域名称长度不能超过250个字符")
    private String name;

    /** code */
    @Excel(name = "code")
    private String code;

    /** longitude */
    @Excel(name = "longitude")
    private String longitude;

    /** latitude */
    @Excel(name = "latitude")
    private String latitude;

    /** status */
    @Excel(name = "status")
    private Integer status;

    /** memo */
    @Excel(name = "memo")
    private String memo;

    /** valid */
    @Excel(name = "valid")
    private Boolean valid;

    public Integer companyId;
    public String companyName;
    public String companyCode;

    public String businessid;

    /** 父部门ID */
    @Excel(name = "父部门ID")
    private Integer parentId;

    /** 是否车间 */
    @Excel(name = "是否车间")
    private Boolean workshop;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createts;

    /** 创建人 */
    @Excel(name = "创建人")
    private Integer createdby;

    /** $column.columnComment */
    @Excel(name = "创建人")
    private Integer sortorder;
    /** 子部门 */
    private List<TBasicRegion> children = new ArrayList<TBasicRegion>();

    private List<Integer> ids;

    private String parentName;

    private String parentCode;

    public List<Integer> getIds() {
        return ids;
    }

    public void setIds(List<Integer> ids) {
        this.ids = ids;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getParentCode() {
        return parentCode;
    }

    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }

    public List<TBasicRegion> getChildren() {
        return children;
    }

    public void setChildren(List<TBasicRegion> children) {
        this.children = children;
    }
    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return code;
    }
    public void setLongitude(String longitude)
    {
        this.longitude = longitude;
    }

    public String getLongitude()
    {
        return longitude;
    }
    public void setLatitude(String latitude)
    {
        this.latitude = latitude;
    }

    public String getLatitude()
    {
        return latitude;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setMemo(String memo)
    {
        this.memo = memo;
    }

    public String getMemo()
    {
        return memo;
    }
    public void setValid(Boolean valid)
    {
        this.valid = valid;
    }

    public Boolean getValid()
    {
        return valid;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getBusinessid() {
        return businessid;
    }

    public void setBusinessid(String businessid) {
        this.businessid = businessid;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public void setWorkshop(Boolean workshop)
    {
        this.workshop = workshop;
    }

    public Boolean getWorkshop()
    {
        return workshop;
    }
    public void setCreatets(Date createts)
    {
        this.createts = createts;
    }

    public Date getCreatets()
    {
        return createts;
    }
    public void setCreatedby(Integer createdby)
    {
        this.createdby = createdby;
    }

    public Integer getCreatedby()
    {
        return createdby;
    }
    public void setSortorder(Integer sortorder)
    {
        this.sortorder = sortorder;
    }

    public Integer getSortorder()
    {
        return sortorder;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("code", getCode())
                .append("longitude", getLongitude())
                .append("latitude", getLatitude())
                .append("status", getStatus())
                .append("memo", getMemo())
                .append("valid", getValid())
                .append("parentId", getParentId())
                .append("workshop", getWorkshop())
                .append("createts", getCreatets())
                .append("createdby", getCreatedby())
                .append("sortorder", getSortorder())
                .toString();
    }
}
